From fe4954aee810b69be0b259e75dfdff619b9b5a33 Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Fri, 26 Aug 2005 03:09:36 +0000 Subject: [PATCH] Handle NULL gracefully. (#314523, Ed Catmur) 2005-08-25 Matthias Clasen * gtk/gtktoolbar.c (_gtk_toolbar_elide_underscores): Handle NULL gracefully. (#314523, Ed Catmur) --- ChangeLog | 5 +++++ ChangeLog.pre-2-10 | 5 +++++ gtk/gtktoolbar.c | 3 +++ 3 files changed, 13 insertions(+) diff --git a/ChangeLog b/ChangeLog index 43328682b0..e68d25f1c4 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2005-08-25 Matthias Clasen + + * gtk/gtktoolbar.c (_gtk_toolbar_elide_underscores): Handle + NULL gracefully. (#314523, Ed Catmur) + 2005-08-25 Owen Taylor * gdk/x11/gdkcursor-x11.c (gdk_x11_display_set_cursor_theme): diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10 index 43328682b0..e68d25f1c4 100644 --- a/ChangeLog.pre-2-10 +++ b/ChangeLog.pre-2-10 @@ -1,3 +1,8 @@ +2005-08-25 Matthias Clasen + + * gtk/gtktoolbar.c (_gtk_toolbar_elide_underscores): Handle + NULL gracefully. (#314523, Ed Catmur) + 2005-08-25 Owen Taylor * gdk/x11/gdkcursor-x11.c (gdk_x11_display_set_cursor_theme): diff --git a/gtk/gtktoolbar.c b/gtk/gtktoolbar.c index db6551cbf0..9cd60bead4 100644 --- a/gtk/gtktoolbar.c +++ b/gtk/gtktoolbar.c @@ -4784,6 +4784,9 @@ _gtk_toolbar_elide_underscores (const gchar *original) const gchar *p; gboolean last_underscore; + if (!original) + return NULL; + q = result = g_malloc (strlen (original) + 1); last_underscore = FALSE; -- 2.30.2